<script setup lang="ts"></script>
<template>
  <RouterView v-slot="{ Component, route }">
    <TransitionGroup name="toggle" tag="div">
      <div class="container" :key="route.fullPath">
        <component :is="Component" v-if="route.fullPath"></component>
      </div>
    </TransitionGroup>
  </RouterView>
</template>
<style lang="scss" scoped>
.toggle-enter-active,
.toggle-leave-active {
  transition: all 1s ease;
}

.toggle-enter-from {
  opacity: 0;
  transform: translateX(-100%);
}
.toggle-leave-to {
  position: absolute;
  opacity: 0;
  transform: translateX(-100%);
}
</style>
